<%@ page import="java.util.HashMap,common.CommonUtil,java.util.*,common.*" contentType="text/html; charset=utf-8" %>
<%@ taglib uri="/WEB-INF/commontags.tld" prefix="common" %><%--페이징처리tag--%>
<%
UserSession userSession = (UserSession)session.getAttribute("user"); 

String login_id = null;
String user_id = null;
String level = null;
String admin_ent_id = null;

if(userSession!= null){
	login_id = userSession.getLogin_id();
	user_id = userSession.getUser_id();
	level = userSession.getAdmin_level();
	admin_ent_id = userSession.getEnt_id();
}

String search_combo 	= CommonUtil.nvl(request.getParameter("search_combo"),"");
String keyword 		= CommonUtil.nvl(request.getParameter("keyword"),"");
String line_number	= CommonUtil.nvl(request.getParameter("line_number"),"10");
//페이징 처리 Start
//페이지 표시정보 받기 혹은 검색입력창
String curr_page = CommonUtil.nvl(request.getParameter("curr_page"),"1");

String one_group = CommonUtil.nvl(request.getParameter("one_group"),"10");
String total_count = CommonUtil.nvl(request.getParameter("total_count"),"0");
//페이징 처리 End

String member_id	= CommonUtil.nvl(request.getParameter("member_id"),""); 
String gubun	= CommonUtil.nvl(request.getParameter("gubun"),""); 
String start_date	= CommonUtil.nvl(request.getParameter("start_date"),""); 
String end_date	= CommonUtil.nvl(request.getParameter("end_date"),"");

HashMap listMap=(HashMap)request.getAttribute("list_map");

HashMap map  = null;
ArrayList list=null;


String total_cnt	= "0";
String A	= "0";
String IH	= "0";
String IM3	= "0";
String IM2	= "0";
String IM1	= "0"; 
String IL	= "0"; 
String NH	= "0"; 
String NM	= "0"; 
String NL	= "0"; 

String A_PER_CNT	= "0";
String IH_PER_CNT	= "0";
String IM3_PER_CNT	= "0";
String IM2_PER_CNT	= "0";
String IM1_PER_CNT	= "0"; 
String IL_PER_CNT	= "0"; 
String NH_PER_CNT	= "0"; 
String NM_PER_CNT	= "0"; 
String NL_PER_CNT	= "0"; 


if (listMap!=null){
    list=(ArrayList)listMap.get("mainContent");
    
}

if(list != null){
	if(list.size() > 0){		
		
		total_cnt = CommonUtil.nvl((String)((HashMap)list.get(0)).get("total_cnt"),"0");
	    A = CommonUtil.nvl((String)((HashMap)list.get(0)).get("A"),"0");
	    IH = CommonUtil.nvl((String)((HashMap)list.get(0)).get("IH"),"0");
	    IM3 = CommonUtil.nvl((String)((HashMap)list.get(0)).get("IM3"),"0");
	    IM2 = CommonUtil.nvl((String)((HashMap)list.get(0)).get("IM2"),"0");
	    IM1 = CommonUtil.nvl((String)((HashMap)list.get(0)).get("IM1"),"0");	      
	    IL = CommonUtil.nvl((String)((HashMap)list.get(0)).get("IL"),"0");
	    NH = CommonUtil.nvl((String)((HashMap)list.get(0)).get("NH"),"0");
	    NM = CommonUtil.nvl((String)((HashMap)list.get(0)).get("NM"),"0");
	    NL = CommonUtil.nvl((String)((HashMap)list.get(0)).get("NL"),"0");
	    
	    A_PER_CNT = CommonUtil.nvl((String)((HashMap)list.get(0)).get("A_PER_CNT"),"0");
	    IH_PER_CNT = CommonUtil.nvl((String)((HashMap)list.get(0)).get("IH_PER_CNT"),"0");
	    IM3_PER_CNT = CommonUtil.nvl((String)((HashMap)list.get(0)).get("IM3_PER_CNT"),"0");
	    IM2_PER_CNT = CommonUtil.nvl((String)((HashMap)list.get(0)).get("IM2_PER_CNT"),"0");
	    IM1_PER_CNT = CommonUtil.nvl((String)((HashMap)list.get(0)).get("IM1_PER_CNT"),"0");	      
	    IL_PER_CNT = CommonUtil.nvl((String)((HashMap)list.get(0)).get("IL_PER_CNT"),"0");
	    NH_PER_CNT = CommonUtil.nvl((String)((HashMap)list.get(0)).get("NH_PER_CNT"),"0");
	    NM_PER_CNT = CommonUtil.nvl((String)((HashMap)list.get(0)).get("NM_PER_CNT"),"0");
	    NL_PER_CNT = CommonUtil.nvl((String)((HashMap)list.get(0)).get("NL_PER_CNT"),"0");
	}
}
%>
<jsp:include page="/jsp/common/header.jsp"></jsp:include>

<style>
body{background-color:#fff;background:#ffffff}
</style>

<form name="mainform"  method="post" action = "/speaking.pb" >
	<div id="bodyContainer">
        <div id="contents">
          
          
          <div class="statistics_opic">
          	<dl title="성적 통계">
              <dt>성적  통계</dt>
            </dl>
            <table class="graphTb">
              <tr>
                <th width="120">등급</th>
                <th width="750">그래프</th>
                <th>취득횟수</th>
              </tr>
<%               

    if (list!=null && list.size()> 0) {
    	
%>
			  <tr>
                <td>Advanced Low</td>
                <td class="bar"><img src="img/bg_bar02.gif" alt="그래프바" width="<%=A_PER_CNT%>%" height="10" /><br />
                  <%=A_PER_CNT%>%</td>
                <td><%=A %></td>
              </tr>
              
              <tr>
                <td>Intermediate High</td>
                <td class="bar"><img src="img/bg_bar02.gif" alt="그래프바" width="<%=IH_PER_CNT%>%" height="10" /><br />
                  <%=IH_PER_CNT%>%</td>
                <td><%=IH %></td>
              </tr>
              <tr>
                <td>Intermediate Mid3</td>
                <td class="bar"><img src="img/bg_bar02.gif" alt="그래프바" width="<%=IM3_PER_CNT%>%" height="10" /><br />
                  <%=IM3_PER_CNT%>%</td>
                <td><%=IM3 %></td>
              </tr>
              <tr>
                <td>Intermediate Mid2</td>
                <td class="bar"><img src="img/bg_bar02.gif" alt="그래프바" width="<%=IM2_PER_CNT%>%" height="10" /><br />
                  <%=IM2_PER_CNT%>%</td>
                <td><%=IM2 %></td>
              </tr>
              <tr>
                <td>Intermediate Mid1</td>
                <td class="bar"><img src="img/bg_bar02.gif" alt="그래프바" width="<%=IM1_PER_CNT%>%" height="10" /><br />
                  <%=IM1_PER_CNT%>%</td>
                <td><%=IM1 %></td>
              </tr>
              <tr>
                <td>Intermediate Low</td>
                <td class="bar"><img src="img/bg_bar02.gif" alt="그래프바" width="<%=IL_PER_CNT%>%" height="10" /><br />
                  <%=IL_PER_CNT%>%</td>
                <td><%=IL %></td>
              </tr>
              <tr>
                <td>Novice High</td>
                <td class="bar"><img src="img/bg_bar02.gif" alt="그래프바" width="<%=NH_PER_CNT%>%" height="10" /><br />
                  <%=NH_PER_CNT%>%</td>
                <td><%=NH %></td>
              </tr>
              <tr>
                <td>Novice Mid</td>
                <td class="bar"><img src="img/bg_bar02.gif" alt="그래프바" width="<%=NM_PER_CNT%>%" height="10" /><br />
                  <%=NM_PER_CNT%>%</td>
                <td><%=NM %></td>
              </tr>
              <tr>
                <td>Novice Low</td>
                <td class="bar"><img src="img/bg_bar02.gif" alt="그래프바" width="<%=NL_PER_CNT%>%" height="10" /><br />
                  <%=NL_PER_CNT%>%</td>
                <td><%=NL %></td>
              </tr>
<%	      
    	
    }else{
%>
              <tr>
                <td colspan=4 align=center>성적통계 자료가 없습니다.</td>
              </tr>
<%} %>              
              
            </table>            
          </div>
          
          
        </div>
      </div>


<input type="hidden" name="cmd" value="">
<input type="hidden" name="member_id" value="<%=member_id %>">
<input type="hidden" name="user_id" value="<%=user_id %>">
<input type="hidden" name="member_test_code" value="">
</form>

<iframe name='hidden_frm'  width='0' height='0' SCROLLING='AUTO' frameborder='0'></iframe>
<jsp:include page="/jsp/common/bottom.jsp"></jsp:include>
